package com.quikin.persistence.jpa.entity.aa;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the PERM_GROUP database table.
 * 
 */
@Entity
@Table(name="PERM_GROUP")
public class PermGroup implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="PERM_GROUP_ID")
	private String permGroupId;

	private String description;

	//bi-directional many-to-many association to Permission
    @ManyToMany
	@JoinTable(
		name="PERMGROUP_PERM"
		, joinColumns={
			@JoinColumn(name="PERM_GROUP_ID")
			}
		, inverseJoinColumns={
			@JoinColumn(name="PERMISSION_ID")
			}
		)
	private Set<Permission> permissions;

    public PermGroup() {
    }

	public String getPermGroupId() {
		return this.permGroupId;
	}

	public void setPermGroupId(String permGroupId) {
		this.permGroupId = permGroupId;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Set<Permission> getPermissions() {
		return this.permissions;
	}

	public void setPermissions(Set<Permission> permissions) {
		this.permissions = permissions;
	}
	
}